package com.norma.netty.study.netty.disruptor;

import com.norma.netty.study.netty.disruptor.core.MessageConsumer;

/**
 * @author zhangchaofeng
 * @date 2021/1/6
 * @description
 */
public class MessageConsumerImpl4Server extends MessageConsumer {

    public MessageConsumerImpl4Server(String consumerId) {
        super(consumerId);
    }

    @Override
    public void onEvent(TransDataWrapper event) throws Exception {
        System.out.println(event);
        TransData data = event.getData();
        data.setMessage("server 已收到" + data.getMessage());
        event.getCtx().writeAndFlush(data);

    }
}
